package com.lee.adapter.service.impl;

import com.lee.adapter.controller.SimpleServletController;
import com.lee.adapter.service.HandlerAdapter;

/**
 * @author zfl_a
 * @date 2020/8/16
 * @project springboot_design_pattern
 */
public class SimpleServletHandlerAdapter implements HandlerAdapter {
    @Override
    public boolean supports(Object handler) {
        return handler instanceof SimpleServletController;
    }

    @Override
    public String handle(Object handler) {

        return ((SimpleServletController)handler).doSimpleServlet();
    }
}
